import java.util.Scanner;
public class RecurringEvent{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);  
		String[] mnths =  {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; 
		System.out.println("What is the Event?");
		String event = scan.nextLine();
		System.out.println("What year is the event");
		int year = scan.nextInt();
		System.out.println("What month is the event");
		int start = scan.nextInt();
		System.out.println("What day is the event");
		int day = scan.nextInt();
		System.out.println("What hour is the event");
		int hour = scan.nextInt();
		System.out.println("What min is the event");
		String min = scan.nextLine();
		System.out.println("What sec is the event");
		String sec = scan.nextLine();
		System.out.println("am or pm?");
		String time = scan.nextLine();
		System.out.println("Until what month?");
		int end = scan.nextInt();
		System.out.println("Any exception?");
		int except = scan.nextInt();
		for(int i = start; i<end; i++){
			if (i == except){
				
			} else{
				System.out.println(event);
				System.out.println("Date: " + mnths[i] + " " + day + " " + year);
				System.out.println("Time: " + hour + ":" + min + ":" + sec + " " + time);
			}
			
			
		}
		
	}
}
